#@note   Hikvision Digital Technology Co., Ltd. All Rights Reserved.
#@brief  CMake子目录配置文件
#@author Yaopei
#@date   2015/7/31
#@note   the CMakeLists.txt for src. directory


PROJECT(HMSProxy)

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g -O2 -Wall")

if(COMMAND cmake_policy)
    cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

INCLUDE_DIRECTORIES(
  ${PROJECT_SOURCE_DIR}/../publiclib/
  ${PROJECT_SOURCE_DIR}/../publiclib/traceworker
  ${PROJECT_SOURCE_DIR}/../publiclib/json-helper
  /home/huangyuan/code/websocketpp/
  /home/huangyuan/code/rapidjson/include
)
LINK_DIRECTORIES(
  ${PROJECT_SOURCE_DIR}/lib
  ${PROJECT_SOURCE_DIR}/event/lib
)


SET(SRC_SRCS
  ${PROJECT_SOURCE_DIR}/../publiclib/traceworker/trace_worker.cpp
  ${PROJECT_SOURCE_DIR}/../publiclib/traceworker/trace_base.cpp
  ${PROJECT_SOURCE_DIR}/../publiclib/traceworker/time_calc.cpp
  ${PROJECT_SOURCE_DIR}/../publiclib/traceworker/platform_base.cpp
  ${PROJECT_SOURCE_DIR}/../publiclib/traceworker/mem_calc.cpp
  ${PROJECT_SOURCE_DIR}/../publiclib/traceworker/log_opr.cpp
  ${PROJECT_SOURCE_DIR}/../publiclib/traceworker/locale_file.cpp
  ${PROJECT_SOURCE_DIR}/../publiclib/traceworker/link_tool.cpp
  ${PROJECT_SOURCE_DIR}/../publiclib/traceworker/IFile.cpp
  ${PROJECT_SOURCE_DIR}/../publiclib/traceworker/file_manager.cpp
  ${PROJECT_SOURCE_DIR}/../publiclib/json-helper/JsonHelper.cpp

  websocket_endpoint.cpp
  main.cpp
)

# shared library
#ADD_LIBRARY(BigdataStreamRecv SHARED ${SRC_SRCS} )

#static library
#ADD_LIBRARY(BigdataStreamRecv_static STATIC ${SRC_SRCS})

ADD_EXECUTABLE(ws-client ${SRC_SRCS})
# link library
TARGET_LINK_LIBRARIES(ws-client event json boost_system boost_thread)

# clean
#SET_TARGET_PROPERTIES(BigdataStreamRecv PROPERTIES CLEAN_DIRECT_OUTPUT 1)
#SET_TARGET_PROPERTIES(BigdataStreamRecv_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)

